﻿<%@ Page Title="Ferramenta" MasterPageFile="~/Site.master" Language="C#" AutoEventWireup="true"
    CodeBehind="Tool.aspx.cs" Inherits="LuckyLoot.Presentation.ToolPage" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <fieldset>
        <legend>Ferramenta</legend>
    <div>
        <label for="toolName">
            Ferramenta*</label><br />
        <asp:TextBox runat="server" ID="toolName" ClientIDMode="Static" CssClass="k-textbox" required></asp:TextBox><br />
        <label for="toolDescription">
            Descrição</label><br />
        <asp:TextBox runat="server" Width="350" ID="toolDescription" ClientIDMode="Static" CssClass="k-textbox" TextMode="MultiLine"
            Columns="20" Rows="4"></asp:TextBox><br />
        <label for="toolLastSterilization">
            Última esterilização</label><br />
        <asp:TextBox runat="server" Width="350" ID="toolLastSterilization" ClientIDMode="Static"></asp:TextBox><br /><br />
        <asp:Button runat="server" ID="SaveTool" Text="Salvar" CssClass="k-button" /> <asp:Button runat="server" Visible="false" ID="SterilizeTool" Text="Esterilizar ferramenta" ToolTip="Define a data da última esterilização da ferramenta como sendo feita no dia de hoje." CssClass="k-button" />
    </div>
    </fieldset>
    <h1><asp:Label ID="toolsLabel" Visible="false" runat="server" Text="Ferramentas"></asp:Label></h1>
    <asp:GridView ID="toolsGrid" Visible="false" ClientIDMode="Static" runat="server" EmptyDataText="-" ></asp:GridView>
    <script>
        $(document).ready(function () {

            var currentTime = new Date();
            var month = currentTime.getMonth();
            var day = currentTime.getDate();
            var year = currentTime.getFullYear();

            $("#toolLastSterilization").kendoDatePicker({
                format: "dd/MM/yyyy",
                start: "month",
                depth: "month",
                min: new Date(1900, 0, 1),
                max: new Date(year, month, day)
            });

            $("#toolsGrid").kendoGrid({
                selectable: true
            });

        });

    </script>
</asp:Content>
